#include<bits/stdc++.h>
using namespace std;
long long a[36][36] = {0};
int main(){
    int n;
    a[0][0] = 1;
    cin >> n;
    cout << 1 <<endl;
    for(int i = 1; i < n; i++){
        a[i][0] = 1;
        for(int j = 1; j <= i/2; j++){
            if(!(i%2)&&j == i/2){
                a[i][i/2] = 2*a[i-1][i/2-1];
            }else
                a[i][j] = a[i-1][j-1] + a[i-1][j];
        }
        for(int j = 0; j <= i/2; j++){
            cout << a[i][j] <<" ";
        }
        for(int j = (i-1)/2; j > 0; j--){
            cout << a[i][j] <<" ";
        }
        cout << 1 <<endl;
    }
    return 0;
}